﻿@model AdminLite.Models.UserListViewModel

@{
    ViewBag.Title = "用户管理";
}
    <div class="box box-primary">
            <div class="box-header with-border">
                <h3 class="box-title">用户详情</h3>
            </div>
            <div class="form-horizontal">
                <div class="form-group">
                    @Html.LabelFor(model => model.Email, new { @class = "control-label col-md-2" })
                    <div class="col-md-4">
                        @Html.DisplayFor(m => m.Email, new { @class = "form-control" })
                    </div>
                </div>
                <div class="form-group">
                    @Html.LabelFor(model => model.UserName, new { @class = "control-label col-md-2" })
                    <div class="col-md-4">
                        @Html.DisplayFor(m => m.UserName, new { @class = "form-control" })
                    </div>
                </div>
                <div class="form-group">
                    @Html.LabelFor(model => model.PhoneNumber, new { @class = "control-label col-md-2" })
                    <div class="col-md-4">
                        @Html.DisplayFor(m => m.PhoneNumber, new { @class = "form-control" })
                    </div>
                </div>
            </div>

            <h5>用户所属角色</h5>
            @if (ViewBag.RoleNames.Count == 0)
            {
                <hr />
                <p>No roles found for this user.</p>
            }

            <table class="table">

                @foreach (var item in ViewBag.RoleNames)
            {
                    <tr>
                        <td>
                            @item
                        </td>
                    </tr>
                }
            </table>
            <p>
                @Html.ActionLink("编辑", "Edit", new { id = Model.Id }) |
                @Html.ActionLink("返回用户列表", "Index")
            </p>

        </div>
